var MC = function()
{
	// singleton
	if ( MC.prototype._singletonInstance ) {
	      return MC.prototype._singletonInstance;
	}
	MC.prototype._singletonInstance = this;

	// Create Object Manager
	MM = new MM();
	
	this.set_distanceFrom = function(mode)
	{
		
		// tell MM how from where to calculate distance
		MM.set_distanceFrom(mode);
		
		var selector = '#distanceFrom';
		// display the location used
		switch(mode)
		{
			case 'here' : 
				console.log('distance from here!!');
				$(selector).html('here');
				
			break;
			case 'user' : 
				console.log('distance from registred location');
				$(selector).html('registred location');
			break;
		}
	};

	function display_distanceFrom(mode)
	{
		
	};
};

console.log('MC loaded');